package Views;

import Source.DisplayDeleteFlight;
import UCM.UCDisplayDeleteFlight;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 *
 * @author Joshua King
 */
public class ViewDisplayDeleteFlight extends JPanel{
    protected JButton deleteFlightButton = new JButton("Delete Flight");
    private final UCDisplayDeleteFlight UCDisplayDeleteFlight = new UCDisplayDeleteFlight(this);
    private DisplayDeleteFlight model;

    public ViewDisplayDeleteFlight() {
        setLayout(new FlowLayout());
        add(deleteFlightButton);
        deleteFlightButton.addActionListener(new AdapterUCCToAL(UCDisplayDeleteFlight));
    }

    
    public void loadTo(DisplayDeleteFlight model) {
        this.model = model;
    }

    public void setDeleteFlightVisible() {
        ViewMain.getInstance().updateDeleteFlight(model.getStr());
    }
}
